﻿using BCCommon.Enums;
using BCCommon.FreightEnums;
using BCCommon.PaymentEnums;
using System;
using System.Collections.Generic;

namespace BCEntity.Common.Payment.Payment
{
    /// <summary>
    /// 支付记录实体
    /// </summary>
    public class PaymentRecordEntity
    {
        /// <summary>
        /// 支付记录Id
        /// </summary>
        public long PaymentRecordId { get; set; }
        /// <summary>
        /// 支付渠道类型
        /// </summary>
        public PaymentChannelType PaymentChannelId { get; set; }
        /// <summary>
        /// 订单类型
        /// </summary>
        public FlowType OrderType { get; set; }
        /// <summary>
        /// 订单编号
        /// </summary>
        public string ReferenceNumber { get; set; }
        /// <summary>
        /// 支付金额
        /// </summary>
        public decimal Amount { get; set; }
        /// <summary>
        /// 用户Id
        /// </summary>
        public long? UserId { get; set; }
        /// <summary>
        /// 支付状态
        /// </summary>
        public string Status { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 支付成功时间
        /// </summary>
        public DateTime? SuccessTime { get; set; }
        /// <summary>
        /// 对账时间
        /// </summary>
        public DateTime? ReconciliationTime { get; set; }
        /// <summary>
        /// 已结算
        /// </summary>
        public bool? IsSettled { get; set; }
        /// <summary>
        /// 结算日期
        /// </summary>
        public DateTime? SettleDate { get; set; }
        /// <summary>
        /// 优惠价格
        /// </summary>
        public decimal Discount { get; set; }

        /// <summary>
        /// 验签时间
        /// </summary>
        public DateTime? CheckSignTime { get; set; }

        /// <summary>
        /// 设备类型
        /// </summary>
        public string AppType { get; set; }
        /// <summary>
        /// 操作系统
        /// </summary>
        public string OSType { get; set; }
        /// <summary>
        /// 付款方
        /// </summary>
        public int? Payer { get; set; }
        /// <summary>
        /// 操作人Id
        /// </summary>
        public long? AdminId { get; set; }
        /// <summary>
        /// 操作人姓名
        /// </summary>
        public string AdminFullName { get; set; }
        /// <summary>
        /// 操作类型
        /// </summary>
        public PaymentOperationType? OperationType { get; set; }
        /// <summary>
        /// 资金流向
        /// </summary>
        public SourceFlowDirectionType FlowDirection { get; set; }
        /// <summary>
        /// 应用账号
        /// </summary>
        public string AppId { get; set; }
        /// <summary>
        /// 已退款成功
        /// </summary>
        public bool? IsRefund { get; set; }
        /// <summary>
        /// 失败备注
        /// </summary>
        public string FailRemark { get; set; }
    }
}
